package com.springBootStudy.spring_ioc.service;

import com.springBootStudy.spring_ioc.dao.UserDao;
import com.springBootStudy.spring_ioc.dao.UserDaoDefaultImpl;
import com.springBootStudy.spring_ioc.dao.UserDaoMysqlImpl;
import com.springBootStudy.spring_ioc.dao.UserDaoOracleImpl;

/**
 * @ program: elasticSearch_jd_study
 * @ description:若不是ioc 程序员控制代码实现
 * @ author: Mr.Zhongsf
 * @ create: 2021-03-04 15:39
 **/
public class UserServiceImpl implements UserService{

    //若不是ioc  程序员控制代码实现  (反转控制Inversion of Control)
    // 业务层调Dao层,组合
    private UserDao userDao= new UserDaoDefaultImpl();
    private UserDao userDaoMysql = new UserDaoMysqlImpl();
    private UserDao userDaoOracle = new UserDaoOracleImpl();

    @Override
    public void getUser() {
            userDao.dealSomething("非ioc->");
    }




}
